﻿using System;
using System.Collections.Generic;
using System.Data;
using Runda.EShop.Common.Utility;
using Runda.EShop.Dal;
using Runda.EShop.Common.Entity;


namespace Runda.EShop.Bll
{
    /// <summary>
    /// BLL Layer For dbo.Biz_ShopCart.
    /// </summary>
    public partial class BizShopCartBll
    {
        public void AddProductToShopcart(BizShopCartEntity entity)
        {
            BizShopCartDal dal = new BizShopCartDal();
            dal.AddProductToShopcart(entity);
        }


        public void BatchInsert(List<BizShopCartEntity> list)
        {
            BizShopCartDal dal = new BizShopCartDal();
            dal.BatchInsert(0,list);
        }

        public void BatchUpdate(List<BizShopCartEntity> list)
        {
            BizShopCartDal dal = new BizShopCartDal();
            dal.BatchInsert(1, list);
        }

         /// <summary>
        /// 检查是否存在空订单
        /// </summary>
        /// <param name="CustomerID"></param>
        /// <param name="ProductID"></param>
        /// <returns></returns>
        public bool ExistsOrderDetail(Guid CustomerID, Guid ProductID)
        {
            BizOrderDetailDal dal = new BizOrderDetailDal();
            return dal.ExistsOrderDetail(CustomerID, ProductID);
        }
    }
}

